home *** CD-ROM | disk | FTP | other *** search
Wrap
XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) NNNNAAAAMMMMEEEE XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx - The ComboBox widget class SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS #include <Xm/ComboBox.h> VVVVEEEERRRRSSSSIIIIOOOONNNN This page documents Motif 2.1. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx combines the capabilities of a single-line TextField widget and a List widget. It allows users to perform opoerations like typing and pasting information, and it also provides a list of possible choices that the user can select from to complete the TextField entry field. The list can either be displayed at all times or can be dropped down by the user. When the list portion of the ComboBox is hidden, users are given a visual cue (a downward-pointing arrow) next to the TextField field. The position of the arrow relative to the TextField field depends on the XXXXmmmmNNNNllllaaaayyyyoooouuuuttttDDDDiiiirrrreeeeccccttttiiiioooonnnn resource of the widget. This version of the ComboBox is called the "drop-down" ComboBox. Drop-down ComboBoxes are useful when screen space is limited, or when users will complete the text entry field more often by typing text than by selecting the entry field text from the list. The user can access the drop-down ComboBox in either one of two ways: +o By clicking and releasing <<<<BBBBttttnnnn1111>>>> on the downward- pointing arrow, which pops the list up, and the list stays up. A later selection of an item in the list will cause the item to appear in the text entry field, and the list will unpost itself. +o By pressing <<<<BBBBttttnnnn1111>>>> on the downward-pointing arrow, dragging it to a list item, and then releasing it there, which selects that item. The list disappears, and the selected item appears in the text entry field. The application provides an array of strings that fill the list. At creation time, string items can be passed to the ComboBox via an arglist. Each string becomes an item in the list, with the first string becoming the item in position 1, the second string becoming the item in position 2, and so on. The size of the list is set by specifying the number of items that are visible in the list (XXXXmmmmNNNNvvvviiiissssiiiibbbblllleeeeIIIItttteeeemmmmCCCCoooouuuunnnntttt). If the number of items in the list exceeds the number of items that are visible, a vertical scroll bar will automatically appear that allows the user to scroll through a large number of items. ComboBox creates two child widgets: a TextField widget for Page 1 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) entering text and a ScrolledWindow containing a List for the list of items. The name of the items list itself is LLLLiiiisssstttt, and the name of the TextField is TTTTeeeexxxxtttt. The application or user can specify resource values for these widgets in a resource file, and the application can use XXXXttttNNNNaaaammmmeeeeTTTTooooWWWWiiiiddddggggeeeetttt(specifying """"****LLLLiiiisssstttt"""" for the items list or """"****TTTTeeeexxxxtttt"""" for the TextField widget) to obtain the widget IDs of the descendant widgets. At creation time, ComboBox passes appropriate resource values in the creation arglist, including XXXXmmmmNNNNiiiitttteeeemmmmssss, to the items list. Note that the result of providing the XXXXmmmmNNNNddddeeeessssttttrrrrooooyyyyCCCCaaaallllllllbbbbaaaacccckkkkresource in the creation _a_r_g_l_i_s_t is unspecified. The application should use the XXXXttttAAAAddddddddCCCCaaaallllllllbbbbaaaacccckkkk function to add callbacks to the appropriate widget (TextField or List) after creating it. ComboBox forces the following resource values on its List child: +o If XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee is XXXXmmmmCCCCOOOOMMMMBBBBOOOO____BBBBOOOOXXXX, XXXXmmmmNNNNttttrrrraaaavvvveeeerrrrssssaaaallllOOOOnnnn is forced to False. +o XXXXmmmmNNNNhhhhiiiigggghhhhlllliiiigggghhhhttttTTTThhhhiiiicccckkkknnnneeeessssssss is forced to 2 in a drop-down ComboBox and to 0 in other types of ComboBoxes. +o XXXXmmmmNNNNbbbboooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh is forced to 0. +o XXXXmmmmNNNNnnnnaaaavvvviiiiggggaaaattttiiiioooonnnnTTTTyyyyppppeeee is forced to XXXXmmmmNNNNOOOONNNNEEEE. +o XXXXmmmmNNNNsssseeeelllleeeeccccttttiiiioooonnnnPPPPoooolllliiiiccccyyyy is forced to XXXXmmmmBBBBRRRROOOOWWWWSSSSEEEE____SSSSEEEELLLLEEEECCCCTTTT. +o XXXXmmmmNNNNlllliiiissssttttSSSSiiiizzzzeeeePPPPoooolllliiiiccccyyyy is forced to XXXXmmmmVVVVAAAARRRRIIIIAAAABBBBLLLLEEEE. +o XXXXmmmmNNNNssssppppaaaacccciiiinnnngggg is forced to 0. +o XXXXmmmmNNNNvvvviiiissssuuuuaaaallllPPPPoooolllliiiiccccyyyy is forced to XXXXmmmmVVVVAAAARRRRIIIIAAAABBBBLLLLEEEE. +o XXXXmmmmNNNNsssseeeelllleeeecccctttteeeeddddPPPPoooossssiiiittttiiiioooonnnnssss is forced to NULL. +o _X_m_N_s_e_l_e_c_t_e_d_P_o_s_i_t_i_o_n_s_C_o_u_n_t is forced to 0. When XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee is XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____LLLLIIIISSSSTTTT, ComboBox forces the following resource values on its TextField child: +o XXXXmmmmNNNNeeeeddddiiiittttaaaabbbblllleeee is forced to False. +o XXXXmmmmNNNNccccuuuurrrrssssoooorrrrPPPPoooossssiiiittttiiiioooonnnnVVVViiiissssiiiibbbblllleeee is forced to False. +o XXXXmmmmNNNNsssshhhhaaaaddddoooowwwwTTTThhhhiiiicccckkkknnnneeeessssssss is forced to 0. By contrast, when XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee is XXXXmmmmCCCCOOOOMMMMBBBBOOOO____BBBBOOOOXXXX or XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____CCCCOOOOMMMMBBBBOOOO____BBBBOOOOXXXX, ComboBox forces the following resource values on its TextField child: Page 2 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) +o XXXXmmmmNNNNeeeeddddiiiittttaaaabbbblllleeee is forced to True. +o XXXXmmmmNNNNccccuuuurrrrssssoooorrrrPPPPoooossssiiiittttiiiioooonnnnVVVViiiissssiiiibbbblllleeee is forced to True. +o XXXXmmmmNNNNeeeeddddiiiittttMMMMooooddddeeee is forced to XXXXmmmmSSSSIIIINNNNGGGGLLLLEEEE____LLLLIIIINNNNEEEE____EEEEDDDDIIIITTTT. ComboBox always forces the values of the following resources on the TextField: +o XXXXmmmmNNNNnnnnaaaavvvviiiiggggaaaattttiiiioooonnnnTTTTyyyyppppeeee is forced to XXXXmmmmNNNNOOOONNNNEEEE. +o XXXXmmmmNNNNhhhhiiiigggghhhhlllliiiigggghhhhttttTTTThhhhiiiicccckkkknnnneeeessssssss is forced to 0. +o XXXXmmmmNNNNbbbboooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh is forced to 0. ComboBox allows a single item to be selected in two ways: by selecting the desired item from the List or by entering text into the TextField. ComboBox does not automatically select a list item if the user types that string into the TextField. It selects the item when the user presses KKKKAAAAccccttttiiiivvvvaaaatttteeee or moves the focus. ComboBox supports the Browse Select selection model of List (see the XXXXmmmmLLLLiiiisssstttt reference page for a description of this model), so selections are mutually exclusive. Selecting an item from the list causes that item to be displayed in the TextField portion of the ComboBox. If an application sets the XXXXmmmmNNNNvvvvaaaalllluuuueeee resource of TextField, that string is shown in the TextField. If the application has not provided any list items, or if there is no current selection, the TextField is empty. The TextField in the ComboBox widget can be either editable or noneditable, depending on the value of the XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee resource. If the TextField is editable, the user can type into it. When the user presses the Return key, the ComboBox will compare the typed entry to the items in the List. If there is an exact match, then the matched List item is selected. If the application wishes to validate the entered text (for example, to ensure that the typed selection is a valid one), it can do so by setting XXXXmmmmNNNNmmmmooooddddiiiiffffyyyyVVVVeeeerrrriiiiffffyyyyCCCCaaaallllllllbbbbaaaacccckkkk on the TextField widget. If the TextField is noneditable, typing text may invoke a matching algorithm that will attempt to match the entered text with items in the list. The specific matching algorithm applied, which may be none, is determined by the value of the XXXXmmmmNNNNmmmmaaaattttcccchhhhBBBBeeeehhhhaaaavvvviiiioooorrrr resource in ComboBox, which can be either XXXXmmmmNNNNOOOONNNNEEEE or XXXXmmmmQQQQUUUUIIIICCCCKKKK____NNNNAAAAVVVVIIIIGGGGAAAATTTTEEEE. A value of XXXXmmmmNNNNOOOONNNNEEEE indicates that no matching algorithm will occur. A value of XXXXmmmmQQQQUUUUIIIICCCCKKKK____NNNNAAAAVVVVIIIIGGGGAAAATTTTEEEE indicates that when the List widget has focus, one-character navigation is supported. In this Page 3 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) algorithm, if the typed character is the initial character of some item in the List, this algorithm causes that item to be navigated to and selected, and the item is displayed in the TextField. Subsequently typing the same character will cycle among the items with the same first character. Regardless of the selection mechanism used (either selected directly from the List or typed into the TextField), when an item in the List is selected, that item is highlighted in the List. In addition, the selected item is displayed in the TextField of the ComboBox. If the user performs an action that would move focus away from ComboBox, or selects a List item, the XXXXmmmmNNNNsssseeeelllleeeeccccttttiiiioooonnnnCCCCaaaallllllllbbbbaaaacccckkkk callbacks are invoked to notify the application of the current contents of the TextField (or choice). The application then takes whatever action is required based on those contents (or choice). ComboBox uses the _X_m_Q_T_s_p_e_c_i_f_y_R_e_n_d_e_r_T_a_b_l_e trait and holds the _X_m_Q_T_a_c_c_e_s_s_T_e_x_t_u_a_l trait. CCCCllllaaaasssssssseeeessss XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx inherits behavior, resources, and traits from CCCCoooorrrreeee, CCCCoooommmmppppoooossssiiiitttteeee, and XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr classes. The class pointer is _x_m_C_o_m_b_o_B_o_x_W_i_d_g_e_t_C_l_a_s_s. The class name is XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx. NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource values for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a ....XXXXddddeeeeffffaaaauuuullllttttssss file, remove the XXXXmmmmNNNN or XXXXmmmmCCCC prefix and use the remaining letters. To specify one of the defined values for a resource in a ....XXXXddddeeeeffffaaaauuuullllttttssss file, remove the XXXXmmmm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words). The codes in the access column indicate if the given resource can be at creation time (C), set by using XXXXttttSSSSeeeettttVVVVaaaalllluuuueeeessss (S), retrieved by using XXXXttttGGGGeeeettttVVVVaaaalllluuuueeeessss (G), or is not applicable (N/A). XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNarrowSize XmCArrowSize Dimension dynamic CSG XmNarrowSpacing XmCArrowSpacing Dimension dynamic CSG XmNcolumns XmCColumn short dynamic CSG XmNcomboBoxType XmCComboBoxType unsigned char XmCOMBO_BOX CG XmNfontList XmCFontList XmFontList NULL CSG XmNhighlightThickness XmCHighlightThickness Dimension 2 CSG Page 4 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) XmNitemCount XmCItemCount int dynamic CSG XmNitems XmCItems XmStringTable dynamic CSG XmNlist XmCList Widget dynamic G XmNmarginHeight XmCMarginHeight Dimension 2 CSG XmNmarginWidth XmCMarginWidth Dimension 2 CSG XmNmatchBehavior XmCMatchBehavior unsigned char dynamic CSG XmNpositionMode XmCPositionMode XtEnum XmZERO_BASED CG XmNrenderTable XmCRenderTable XmRenderTable dynamic CSG XmNselectedItem XmCSelectedItem XmString NULL CSG XmNselectedPosition XmCSelectedPosition int dynamic CSG XmNselectionCallback XmCCallback XmCallbackList NULL C XmtextField XmCTextField Widget dynamic G XmNvisibleItemCount XmCVisibleItemCount int 10 CSG XXXXmmmmNNNNaaaarrrrrrrroooowwwwSSSSiiiizzzzeeee Specifies the width of the arrow. The default size depends on the size of the text, as well as the size of the ComboBox. XXXXmmmmNNNNaaaarrrrrrrroooowwwwSSSSppppaaaacccciiiinnnngggg Specifies the space between the text and arrow visual in pixels. The default value is obtained from the XXXXmmmmNNNNmmmmaaaarrrrggggiiiinnnnWWWWiiiiddddtttthhhh resource. XXXXmmmmNNNNccccoooolllluuuummmmnnnnssss Specifies the number of columns in the text field. If unset, the text field's value is used. Refer to the _X_m_T_e_x_t_F_i_e_l_d man page for more detailed information. XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee Specifies the type of ComboBox to be created. This can be one of the following: XXXXmmmmCCCCOOOOMMMMBBBBOOOO____BBBBOOOOXXXX Generates a ComboBox where the list is always displayed, and the text entry field is editable. XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____CCCCOOOOMMMMBBBBOOOO____BBBBOOOOXXXX Generates a ComboBox where the list is hidden unless specifically requested, and the text entry field is editable. XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____LLLLIIIISSSSTTTT Generates a ComboBox where the list is hidden unless specifically requested, and the text entry field is noneditable. XXXXmmmmNNNNffffoooonnnnttttLLLLiiiisssstttt Specifies the fontlist associated with XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx. The fontlist is an obsolete construct, and has Page 5 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) been superseded by the render table. It is included for compatibility with earlier versions of Motif, and for applications that do not easily support render tables. The default fontlist is derived from the default render table, and if both a fontlist and a render table are specified, the render table takes precedence. XXXXmmmmNNNNhhhhiiiigggghhhhlllliiiigggghhhhttttTTTThhhhiiiicccckkkknnnneeeessssssss Specifies the thickness of the highlighting rectangle. XXXXmmmmNNNNiiiitttteeeemmmmCCCCoooouuuunnnntttt Specifies the number of items in the list. If unset, the lists's value is used. Refer to the _X_m_L_i_s_t man page for more detailed information. XXXXmmmmNNNNiiiitttteeeemmmmssss Specifies the items in the list. If unset, the lists's value is used. Refer to the _X_m_L_i_s_t man page for more detailed information. XXXXmmmmNNNNlllliiiisssstttt The list widget. XXXXmmmmNNNNmmmmaaaarrrrggggiiiinnnnWWWWiiiiddddtttthhhh Specifies the horizontal spacing between the child widgets and the boundary of the ComboBox. XXXXmmmmNNNNmmmmaaaarrrrggggiiiinnnnHHHHeeeeiiiigggghhhhtttt Specifies the vertical spacing between the child widgets and the boundary of the ComboBox. XXXXmmmmNNNNmmmmaaaattttcccchhhhBBBBeeeehhhhaaaavvvviiiioooorrrr Defines the matching algorithm applied to match the text typed by the user in the TextField field with items in the list. The current values are XXXXmmmmNNNNOOOONNNNEEEE and XXXXmmmmQQQQUUUUIIIICCCCKKKK____NNNNAAAAVVVVIIIIGGGGAAAATTTTEEEE, as follows: XXXXmmmmNNNNOOOONNNNEEEE Indicates that there is no assigned matching algorithm. XXXXmmmmQQQQUUUUIIIICCCCKKKK____NNNNAAAAVVVVIIIIGGGGAAAATTTTEEEE Is only valid for noneditable ComboBoxes (XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee resource value XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____LLLLIIIISSSSTTTT). This algorithm supports 1-character navigation when the List widget has focus. If the typed character is the initial character of some item in the List, this algorithm causes that item to be navigated to and selected. Subsequently typing the same character will cycle among the items with the same first character. Page 6 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) XXXXmmmmNNNNppppoooossssiiiittttiiiioooonnnnMMMMooooddddeeee Specifies how the value of the XXXXmmmmNNNNsssseeeelllleeeecccctttteeeeddddPPPPoooossssiiiittttiiiioooonnnnresource and the iiiitttteeeemmmm____ppppoooossssiiiittttiiiioooonnnn field of the callback structure are to be interpreted. Note that the convenience functions _X_m_C_o_m_b_o_B_o_x_D_e_l_e_t_e_P_o_s and _X_m_C_o_m_b_o_B_o_x_A_d_d_I_t_e_mare not affected by this resource, and (like _X_m_L_i_s_t) always use 1-based positions. Valid values for this resource are: XXXXmmmmZZZZEEEERRRROOOO____BBBBAAAASSSSEEEEDDDD (DtComboBox compatibility mode: default) XXXXmmmmNNNNsssseeeelllleeeecccctttteeeeddddPPPPoooossssiiiittttiiiioooonnnnis in [[[[0000,,,,iiiitttteeeemmmmccccoooouuuunnnntttt---- 1111]]]]. The iiiitttteeeemmmm____ppppoooossssiiiittttiiiioooonnnn in the _X_m_C_o_m_b_o_B_o_x_C_a_l_l_b_a_c_k_S_t_r_u_c_tis 0 if the first element in the list was selected. Note that 0 is also returned if no element in the list was selected (that is, a new item was entered in the text field). XXXXmmmmOOOONNNNEEEE____BBBBAAAASSSSEEEEDDDD (Motif mode) Both the resource value and the callback fields are 1-based. This is consistent with other Motif widgets. XXXXmmmmNNNNrrrreeeennnnddddeeeerrrrTTTTaaaabbbblllleeee Specifies the render table associated with ComboBox. This render table is used in both the TextField field and the List in the ComboBox. This is used in conjunction with the XXXXmmmmNNNNvvvviiiissssiiiibbbblllleeeeIIIItttteeeemmmmCCCCoooouuuunnnntttt resource of the List to determine the height of the ComboBox widget. If this value is NULL at initialization, and if the widget parent is XXXXmmmmBBBBuuuulllllllleeeettttiiiinnnnBBBBooooaaaarrrrdddd or its subclasses, VVVVeeeennnnddddoooorrrrSSSShhhheeeellllllll or its subclasses, or XXXXmmmmMMMMeeeennnnuuuuSSSShhhheeeellllllll, then the widget parent provides the default render table associated with the widget. If both a render table and a fontlist are specified, the render table will take precedence. XXXXmmmmNNNNsssseeeelllleeeecccctttteeeeddddIIIItttteeeemmmm Specifies a compound string that represents the current selection of the ComboBox. The selected item is the content of the ComboBox text entry field. XXXXmmmmNNNNsssseeeelllleeeecccctttteeeeddddPPPPoooossssiiiittttiiiioooonnnn If the selection in the ComboBox is an item in the list, this is the index of the selected item in the list. If no item in the list is selected, this Page 7 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) is 0. XXXXmmmmNNNNsssseeeelllleeeeccccttttiiiioooonnnnCCCCaaaallllllllbbbbaaaacccckkkk Specifies the list of callbacks called when an item is selected. The reason field in the XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxxCCCCaaaallllllllbbbbaaaacccckkkkSSSSttttrrrruuuucccctttt is XXXXmmmmCCCCRRRR____SSSSEEEELLLLEEEECCCCTTTT. XXXXmmmmNNNNtttteeeexxxxttttFFFFiiiieeeelllldddd The text field widget. XXXXmmmmNNNNvvvviiiissssiiiibbbblllleeeeIIIItttteeeemmmmCCCCoooouuuunnnntttt Specifies the number of visible items in the list. This will override any value specified for the list. Refer to the _X_m_L_i_s_t man page for more detailed information. IIIInnnnhhhheeeerrrriiiitttteeeedddd RRRReeeessssoooouuuurrrrcccceeeessss ComboBox inherits behavior and resources from superclasses described in the following tables. For a complete description of each resource, refer to the reference page for that superclass. XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG XmNforeground XmCForeground Pixel dynamic CSG XmNhelpCallback XmCCallback XtCallbackList NULL C XmNhighlightColor XmCHighlightColor Pixel dynamic CSG XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG XmNinitialFocus XmCInitialFocus Widget NULL CSG XmNlayoutDirection XmCLayoutDirection XmDirection dynamic CG XmNnavigationType XmCNavigationType XmNavigationType XmSTICKY_TAG_GROUP CSG XmNpopupHandlerCallback XmCCallback XtCallbackList NULL C XmNshadowThickness XmCShadowThickness Dimension 2 CSG XmNstringDirection XmCStringDirection XmStringDirection dynamic CG XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG XmNtraversalOn XmCTraversalOn Boolean True CSG XmNunitType XmCUnitType unsigned char dynamic CSG XmNuserData XmCUserData XtPointer NULL CSG CCCCoooommmmppppoooossssiiiitttteeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNchildren XmCReadOnly WidgetList NULL G XmNinsertPosition XmCInsertPosition XtOrderProc NULL CSG XmNnumChildren XmCReadOnly Cardinal 0 G CCCCoooorrrreeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNaccelerators XmCAccelerators XtAccelerators dynamic CSG XmNancestorSensitive XmCSensitive Boolean dynamic G XmNbackground XmCBackground Pixel dynamic CSG Page 8 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG XmNborderWidth XmCBorderWidth Dimension 0 CSG XmNcolormap XmCColormap Colormap dynamic CG XmNdepth XmCDepth int dynamic CG XmNdestroyCallback XmCCallback XtCallbackList NULL C XmNheight XmCHeight Dimension dynamic CSG XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG XmNscreen XmCScreen Screen * dynamic CG XmNsensitive XmCSensitive Boolean True CSG XmNtranslations XmCTranslations XtTranslations dynamic CSG XmNwidth XmCWidth Dimension dynamic CSG XmNx XmCPosition Position 0 CSG XmNy XmCPosition Position 0 CSG CCCCaaaallllllllbbbbaaaacccckkkk IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn A pointer to the following structure is passed to each callback. The callback structure is defined as follows: typedef struct { int _r_e_a_s_o_n; XEvent *_e_v_e_n_t; XmString _i_t_e_m__o_r__t_e_x_t; int _i_t_e_m__p_o_s_i_t_i_o_n; } XmComboBoxCallbackStruct; _r_e_a_s_o_n Indicates why the callback was invoked. _e_v_e_n_t Points to the _X_E_v_e_n_t that triggered the callback. It can be NULL. _i_t_e_m__o_r__t_e_x_t The contents of the text field at the time the event caused the callback. The _i_t_e_m__o_r__t_e_x_t parameter points to a temporary storage space that is reused after the callback is finished. If an application needs to save the item, it should copy _i_t_e_m__o_r__t_e_x_t into its own data space. _i_t_e_m__p_o_s_i_t_i_o_n The position of item in the list's XXXXmmmmNNNNiiiitttteeeemmmmssss 1- based array. If this is 0, it means that the _i_t_e_m__o_r__t_e_x_t was not selected from the List. TTTTrrrraaaannnnssssllllaaaattttiiiioooonnnnssss The ComboBox translations are listed below. The following key names are listed in the X standard key event translation table syntax. This format is the one used Page 9 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) by Motif to specify the widget actions corresponding to a given key. A brief overview of the format is provided under VVVViiiirrrrttttuuuuaaaallllBBBBiiiinnnnddddiiiinnnnggggssss(3). For a complete description of the format, please refer to the X Toolkit Instrinsics Documentation. NNNNooootttteeee:::: The KPageUp and KPageDown translations do not take effect unless the LLLLiiiisssstttt child widget is posted. <<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>>: CBArmAndDropDownList() <<<<BBBBttttnnnn1111UUUUpppp>>>>: CBDisarm() The following lists the List translations in the drop-down list. When ComboBox XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee is XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____LLLLIIIISSSSTTTT, <<<<oooossssffffAAAAccccttttiiiivvvvaaaatttteeee>>>>, <<<<oooossssffffCCCCaaaannnncccceeeellll>>>>, and RRRReeeettttuuuurrrrnnnn are overriden by ComboBox actions. ::::cccc <Key><<<<oooossssffffDDDDoooowwwwnnnn>>>>: CBDropDownList() ::::cccc <Key><<<<oooossssffffUUUUpppp>>>>: CBDropDownList() ::::<Key><<<<oooossssffffCCCCaaaannnncccceeeellll>>>>: CBCancel() ::::<Key><<<<oooossssffffAAAAccccttttiiiivvvvaaaatttteeee>>>>: CBActivate() ~~~~ssss ~~~~mmmm ~~~~aaaa<Key>RRRReeeettttuuuurrrrnnnn: CBActivate() AAAAcccccccceeeelllleeeerrrraaaattttoooorrrrssss The following accelerators are added to ComboBox and its children. The accelerators may not directly correspond to a translation table. If the translation is not listed below, it may depend on the context of the event. ::::cccc <Key><<<<oooossssffffUUUUpppp>>>>: CBDropDownList() ::::<Key><<<<oooossssffffUUUUpppp>>>>: CBListAction(_U_p) ::::cccc <Key><<<<oooossssffffDDDDoooowwwwnnnn>>>>: CBDropDownList() ::::<Key><<<<oooossssffffDDDDoooowwwwnnnn>>>>: Page 10 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) CBListAction(_D_o_w_n) ::::cccc <Key><<<<oooossssffffBBBBeeeeggggiiiinnnnLLLLiiiinnnneeee>>>>: CBListAction(_L_i_s_t_B_e_g_i_n_D_a_t_a) ::::cccc <Key><<<<oooossssffffEEEEnnnnddddLLLLiiiinnnneeee>>>>: CBListAction(_L_i_s_t_E_n_d_D_a_t_a) ::::<Key><<<<oooossssffffPPPPaaaaggggeeeeUUUUpppp>>>>: CBListAction(_L_i_s_t_P_r_e_v_P_a_g_e) ::::<Key><<<<oooossssffffPPPPaaaaggggeeeeDDDDoooowwwwnnnn>>>>: CBListAction(_L_i_s_t_N_e_x_t_P_a_g_e) A drop-down ComboBox also adds accelerators to its List child. Aside from the accelerators that are already listed in this section, those accelerators are the default TextField key translations. AAAAccccttttiiiioooonnnn RRRRoooouuuuttttiiiinnnneeeessss The XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx action routines are as follows: CBActivate(): Calls the XXXXmmmmNNNNsssseeeelllleeeeccccttttiiiioooonnnnCCCCaaaallllllllbbbbaaaacccckkkk callbacks. If the XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee is XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____CCCCOOOOMMMMBBBBOOOO____BBBBOOOOXXXX or XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____LLLLIIIISSSSTTTT, it unposts the list. If the parent is a manager, passes the event to the parent. CBArmAndDropDownList(): If the pointer is within the down arrow, draws the shadow of the arrow in the selected state, and then posts the list. CBCancel(): If the XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee is XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____CCCCOOOOMMMMBBBBOOOO____BBBBOOOOXXXX or XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____LLLLIIIISSSSTTTT, pops down the list. If the parent is a manager, passes the event to the parent. CBDisarm(): Redraws the arrow in an unselected state. CBDropDownList(): If XXXXmmmmNNNNccccoooommmmbbbbooooBBBBooooxxxxTTTTyyyyppppeeee is XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN or XXXXmmmmDDDDRRRROOOOPPPP____DDDDOOOOWWWWNNNN____LLLLIIIISSSSTTTT, and list is not displayed, posts the list. If list is displayed, it unposts the list. CBListAction(_L_i_s_t_B_e_g_i_n_D_a_t_a): Moves the location cursor to the first item in the list. In Normal Mode, this also deselects any Page 11 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) current selection, selects the first item in the list, and calls the XXXXmmmmNNNNbbbbrrrroooowwwwsssseeeeSSSSeeeelllleeeeccccttttiiiioooonnnnCCCCaaaallllllllbbbbaaaacccckkkk selection callback. CBListAction(_L_i_s_t_E_n_d_D_a_t_a): Moves the location cursor to the last item in the list. In Normal Mode, this also deselects any current selection, selects the last item in the list, and calls the XXXXmmmmNNNNbbbbrrrroooowwwwsssseeeeSSSSeeeelllleeeeccccttttiiiioooonnnnCCCCaaaallllllllbbbbaaaacccckkkk selection callback. CBListAction(_L_i_s_t_P_r_e_v_P_a_g_e): Scrolls the list to the previous page, moving the location cursor to a new item. This action also selects the new item, deselects any current selection, and calls the XXXXmmmmNNNNbbbbrrrroooowwwwsssseeeeSSSSeeeelllleeeeccccttttiiiioooonnnnCCCCaaaallllllllbbbbaaaacccckkkk callbacks. If the ComboBox is not a drop-down type, then this action does nothing. CBListAction(_L_i_s_t_N_e_x_t_P_a_g_e): Scrolls the list to the next page, moving the location cursor to a new item. This action also selects the new item, deselects any current selection, and calls the XXXXmmmmNNNNbbbbrrrroooowwwwsssseeeeSSSSeeeelllleeeeccccttttiiiioooonnnnCCCCaaaallllllllbbbbaaaacccckkkk callbacks. If the ComboBox is not a drop-down type, then this action does nothing. CBListAction(_U_p): Moves the location cursor to the previous item in the list. This action also selects the previous item, deselects any current selection, and calls the XXXXmmmmNNNNbbbbrrrroooowwwwsssseeeeSSSSeeeelllleeeeccccttttiiiioooonnnnCCCCaaaallllllllbbbbaaaacccckkkk callbacks. Note that, unlike the List LLLLiiiissssttttPPPPrrrreeeevvvvIIIItttteeeemmmm action, this action wraps around. CBListAction(_D_o_w_n): Moves the location cursor to the next item in the list. This action also selects the next item, deselects any current selection, and calls the XXXXmmmmNNNNbbbbrrrroooowwwwsssseeeeSSSSeeeelllleeeeccccttttiiiioooonnnnCCCCaaaallllllllbbbbaaaacccckkkk callbacks. Note that, unlike the List LLLLiiiissssttttNNNNeeeexxxxttttIIIItttteeeemmmm action, this action wraps around. VVVViiiirrrrttttuuuuaaaallll BBBBiiiinnnnddddiiiinnnnggggssss The bindings for virtual keys are vendor specific. For information about bindings for virtual buttons and keys, see VVVViiiirrrrttttuuuuaaaallllBBBBiiiinnnnddddiiiinnnnggggssss(3). EEEERRRRRRRROOOORRRRSSSS////WWWWAAAARRRRNNNNIIIINNNNGGGGSSSS The toolkit will display a warning if the application tries Page 12 (printed 10/3/02) XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCoooommmmbbbbooooBBBBooooxxxx((((3333XXXX)))) to set the value of XXXXmmmmNNNNlllliiiissssttttor the XXXXmmmmNNNNtttteeeexxxxttttFFFFiiiieeeelllldddd resource, which are read-only (marked G in the resource table). RRRREEEELLLLAAAATTTTEEEEDDDD CCCCoooommmmppppoooossssiiiitttteeee(3), CCCCoooorrrreeee(3), XXXXmmmmCCCCrrrreeeeaaaatttteeeeCCCCoooommmmbbbbooooBBBBooooxxxx(3), XXXXmmmmLLLLiiiisssstttt(3), XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr(3), and XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeelllldddd(3). Page 13 (printed 10/3/02)